#ifndef __APP_MQTT_H__
#define __APP_MQTT_H__

#include <unistd.h>

#define MQTT_SERVER "ws://192.168.10.1:1883"
#define MQTT_CLIENT_ID "035b06e2-115f-4abc-ac35-24deb08ba432"
#define MQTT_PUSH_TOPIC "gateway/push"
#define MQTT_PULL_TOPIC "gateway/pull"
#define MQTT_QOS 0


/**
 * @brief 初始化
 * @return int 0:成功, -1:失败
 */
int app_mqtt_init();


/**
 * @brief 通过MQTT客户端发布消息
 * 
 * @return int 0:成功, -1:失败
 */
int app_mqtt_publish(char *mqtt_message, size_t mqtt_message_len);




/**
 * @brief 释放资源
 */
void app_mqtt_deinit();


#endif /* __APP_MQTT_H__ */